-
Notifications
You must be signed in to change notification settings - Fork 38
Adjustments for running hub in non-priv/non-systemd container #1718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjustments for running hub in non-priv/non-systemd container #1718
Conversation
For UBI container images this package/command is not installed by default so require it as the installation scriptlets need it. Ticket: ENT-12995
For example, an ubi9 container image contains systemctl command that will fail always because systemd is not started. Ticket: ENT-12653 Changelog: none
Thanks for submitting a PR! Maybe @craigcomstock can review this? |
@cf-bottom jenkins please |
Alright, I triggered a build: Jenkins: https://ci.cfengine.com/job/pr-pipeline/12156/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-12156/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@@ -14,6 +14,10 @@ Url: https://cfengine.com | |||
BuildRoot: %{_topdir}/%{name}-%{version}-%{release}-buildroot | |||
Obsoletes: cfengine3 < @@VERSION@@, cf-community < @@VERSION@@ | |||
Requires: coreutils | |||
|
|||
# installation scriptlets need hostname command, not present in UBI container images | |||
Requires: hostname |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should/could do /bin/hostname
here instead, but it's probably just the same in the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. Yeah, I wasn't sure how Requires works. I asked gemini and the summary is basically:
So, while the hostname.spec file doesn't explicitly state Provides: /usr/bin/hostname, the rpmbuild process, via the find-provides script and the rpmdeps binary, automatically adds that capability to the final .rpm package.
Because https://git.centos.org/rpms/hostname/blob/c8s/f/SPECS/hostname.spec doesn't have a Provides: but does include an executable so included in what it provides and would work with Requires. I hesitate to use /bin/hostname
as maybe it might get moved to a different path like /sbin/hostname
. Unlikely but it feels to me like just the package name is pretty good. I don't believe that rpm will flexibly look for any executable path ending in hostname
.
I won't cherry pick this right away since master will become next LTS and this change probably needs to "bake" a bit. |
Uh oh!
There was an error while loading. Please reload this page.